package de.baumann.browser.model

import de.baumann.browser.api.net.OCBApiService
import de.baumann.browser.api.net.base.ApiBuilder
import de.baumann.browser.api.net.vo.Coin
import de.baumann.browser.api.net.vo.Result
import de.baumann.browser.rx.RxSchedulers
import io.reactivex.Observable

private val oCBApiService: OCBApiService = ApiBuilder.buildService(OCBApiService::class.java)

fun coinList(): Observable<Result<List<Coin>>> {
    return oCBApiService.coinList().compose(RxSchedulers.ioMain())
}